package com.oracle.calllog.etl.model;

/******************************************
 * @ClassName Calllog
 * @Description 一条通话日志信息的Bean实体类
 * @Author Mr.Chen
 * @Date 2022/6/11 21:13
 * @Version 1.0
 *****************************************/
public class Calllog {
	//通话编号
	private String callId;
	//主叫人所在城市
	private String contact1Division;
	//主叫人网络类型(2G|3G|4G|5G)
	private String contact1NetType;
	//主叫人移动卡业务类型(全球通|神州行|动感地带)
	private String contact1BizType;
	//主叫号码
	private String contact1No;
	//主叫人姓名
	private String contact1Name;
	//被叫人所在城市
	private String contact2Division;
	//被叫人网络类型(2G|3G|4G|5G)
	private String contact2NetType;
	//被叫人运营商类型(移动|联通|电信)
	private String contact2OperatorType;
	//被叫号码
	private String contact2No;
	//被叫人姓名
	private String contact2Name;
	//通话开始时间
	private String buildTime;
	//通话时长
	private String callDuration;
	//通话类型(接通|未接通|语音信箱)
	private String connectType;
	//通话记录类型(0:主叫通话记录|1:被叫通话记录)
	private String callFlag;
	// 判断数据是否合法
	private boolean valid = true;


	public String getCallId() {
		return callId;
	}

	public void setCallId(String callId) {
		this.callId = callId;
	}

	public String getContact1Division() {
		return contact1Division;
	}

	public void setContact1Division(String contact1Division) {
		this.contact1Division = contact1Division;
	}

	public String getContact1NetType() {
		return contact1NetType;
	}

	public void setContact1NetType(String contact1NetType) {
		this.contact1NetType = contact1NetType;
	}

	public String getContact1BizType() {
		return contact1BizType;
	}

	public void setContact1BizType(String contact1BizType) {
		this.contact1BizType = contact1BizType;
	}

	public String getContact1No() {
		return contact1No;
	}

	public void setContact1No(String contact1No) {
		this.contact1No = contact1No;
	}

	public String getContact1Name() {
		return contact1Name;
	}

	public void setContact1Name(String contact1Name) {
		this.contact1Name = contact1Name;
	}

	public String getContact2Division() {
		return contact2Division;
	}

	public void setContact2Division(String contact2Division) {
		this.contact2Division = contact2Division;
	}

	public String getContact2NetType() {
		return contact2NetType;
	}

	public void setContact2NetType(String contact2NetType) {
		this.contact2NetType = contact2NetType;
	}

	public String getContact2OperatorType() { return contact2OperatorType; }

	public void setContact2OperatorType(String contact2OperatorType) {
		this.contact2OperatorType = contact2OperatorType;
	}

	public String getContact2No() {
		return contact2No;
	}

	public void setContact2No(String contact2No) {
		this.contact2No = contact2No;
	}

	public String getContact2Name() {
		return contact2Name;
	}

	public void setContact2Name(String contact2Name) {
		this.contact2Name = contact2Name;
	}

	public String getBuildTime() {
		return buildTime;
	}

	public void setBuildTime(String buildTime) {
		this.buildTime = buildTime;
	}

	public String getCallDuration() {
		return callDuration;
	}

	public void setCallDuration(String callDuration) {
		this.callDuration = callDuration;
	}

	public String getConnectType() {
		return connectType;
	}

	public void setConnectType(String connectType) {
		this.connectType = connectType;
	}

	public String getCallFlag() {
		return callFlag;
	}

	public void setCallFlag(String callFlag) {
		this.callFlag = callFlag;
	}

	public boolean isValid() {
		return valid;
	}

	public void setValid(boolean valid) {
		this.valid = valid;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append(this.callId)
				.append("\t").append(this.contact1Division)
				.append("\t").append(this.contact1NetType)
				.append("\t").append(this.contact1BizType)
				.append("\t").append(this.contact1No)
				.append("\t").append(this.contact1Name)
				.append("\t").append(this.contact2Division)
				.append("\t").append(this.contact2NetType)
				.append("\t").append(this.contact2OperatorType)
				.append("\t").append(this.contact2No)
				.append("\t").append(this.contact2Name)
				.append("\t").append(this.buildTime)
				.append("\t").append(this.callDuration)
				.append("\t").append(this.connectType);

		return builder.toString();
	}

	public String getCallTimesDurationAnalyzeString() {
		StringBuilder builder = new StringBuilder();
		builder.append(this.contact1No)
				.append("\t").append(this.contact1Name)
				.append("\t").append(this.contact2No)
				.append("\t").append(this.contact2Name)
				.append("\t").append(this.buildTime)
				.append("\t").append(this.callDuration);

		return builder.toString();
	}
}

